package com.hc.enums;

/**
 * 异常枚举
 *
 * @author 梁云亮
 */
public enum ResultEnum {
    ///////////////////////////////成功//////////////////////////////////////////
    /**
     * 成功
     */
    SUCCESS(200, "成功"),
    /**
     * 验证码正确
     */
    CHECK_CODE_SUCCESS(200, "验证码成功"),


    //////////////////////////////////失败/////////////////////////////////////////
    /**
     * 失败
     */
    FAIL(400, "失败"),
    /**
     * 参数无效
     */
    PARAM_IS_INVALID(400, "参数无效"),
    /**
     * 验证码错误
     */
    CHECK_CODE_ERROR(400, "验证码错误"),

    /**
     * 系统内部发生异常，请联系管理员
     */
    INTERNAL_SERVER_ERROR(500, "系统内部发生异常，请联系管理员"),

    //FILE_UPLOAD_ERROR(501, "文件上传错误"),
    //FILE_DELETE_ERROR(502, "文件刪除错误"),
    //BAD_SQL_GRAMMAR(503, "SQL语法错误"),
    //JSON_PARSE_ERROR(504, "JSON解析异常"),
    //EXCEL_IMPORT_ERROR(505, "Excel数据导入错误"),
    //EXCEL_EXPORT_ERROR(506, "Excel数据导出错误"),

    //////////////////////////////////权限错误/////////////////////////////////////////


    //LOGIN_PHONE_ERROR(7001, "手机号码不正确"),
    //LOGIN_NAME_ERROR(7002, "账号不正确"),
    //LOGIN_PASSWORD_ERROR(7003, "密码不正确"),
    /**
     * 用户名或密码错误
     */
    USER_NAME_PASSWORD_ERROR(704, "用户名或密码错误")
    //LOGIN_DISABLED_ERROR(7005, "该用户已被禁用"),
    //REGISTER_PHONE_ERROR(7006, "手机号已被注册"),
    //USER_NOT_LOGGED_IN(7007, "用户未登录，请先登录"),
    //PERMISSION_TOKEN_EXPIRED(7008, "token已过期"),
    //PERMISSION_TOKEN_INVALID(7009, "无效token"),
    //PERMISSION_SIGNATURE_ERROR(7010, "签名失败"),
    //PERMISSION_DONOT_HAVE(7011, "没有权限")
    ;

    //LOGIN_SUCCESS(200, "登录成功"),
    //INSERT_SUCCESS(200, "添加成功"),
    //UPDATE_SUCCESS(200, "修改成功"),
    //DELETE_SUCCESS(200, "删除成功"),
    //SELECT_SUCCESS(200, "查询成功"),
    //
    //
    //CREATED(201, "Created"),
    //ACCEPTED(202, "Accepted"),
    //NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information"),
    //NO_CONTENT(204, "No Content"),
    //RESET_CONTENT(205, "Reset Content"),
    //PARTIAL_CONTENT(206, "Partial Content"),
    //MULTI_STATUS(207, "Multi-Status"),
    //ALREADY_REPORTED(208, "Already Reported"),
    //IM_USED(226, "IM Used"),
    //MULTIPLE_CHOICES(300, "Multiple Choices"),
    //MOVED_PERMANENTLY(301, "Moved Permanently"),
    //FOUND(302, "Found"),
    //SEE_OTHER(303, "See Other"),
    //NOT_MODIFIED(304, "Not Modified"),
    //TEMPORARY_REDIRECT(307, "Temporary Redirect"),
    //PERMANENT_REDIRECT(308, "Permanent Redirect"),
    //
    //
    //LOGIN_ERROR(400, "登录失败"),
    //BAD_REQUEST(400, "Bad Request"),
    //UNAUTHORIZED(401, "Unauthorized"),
    //PAYMENT_REQUIRED(402, "Payment Required"),
    //FORBIDDEN(403, "Forbidden"),
    //NOT_FOUND(404, "Not Found"),
    //METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
    //NOT_ACCEPTABLE(406, "Not Acceptable"),
    //PROXY_AUTHENTICATION_REQUIRED(407, "Proxy Authentication Required"),
    //REQUEST_TIMEOUT(408, "Request Timeout"),
    //CONFLICT(409, "Conflict"),
    //GONE(410, "Gone"),
    //LENGTH_REQUIRED(411, "Length Required"),
    //PRECONDITION_FAILED(412, "Precondition Failed"),
    //PAYLOAD_TOO_LARGE(413, "Payload Too Large"),
    //URI_TOO_LONG(414, "URI Too Long"),
    //UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"),
    //REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested range not satisfiable"),
    //EXPECTATION_FAILED(417, "Expectation Failed"),
    //I_AM_A_TEAPOT(418, "I'm a teapot"),
    //UNPROCESSABLE_ENTITY(422, "Unprocessable Entity"),
    //LOCKED(423, "Locked"),
    //FAILED_DEPENDENCY(424, "Failed Dependency"),
    //TOO_EARLY(425, "Too Early"),
    //UPGRADE_REQUIRED(426, "Upgrade Required"),
    //PRECONDITION_REQUIRED(428, "Precondition Required"),
    //TOO_MANY_REQUESTS(429, "Too Many Requests"),
    //REQUEST_HEADER_FIELDS_TOO_LARGE(431, "Request Header Fields Too Large"),
    //UNAVAILABLE_FOR_LEGAL_REASONS(451, "Unavailable For Legal Reasons"),

    //PARAM_ERROR(453, "参数不正确"),
    //
    ///**
    // * 服务器错误
    // */
    //
    //NOT_IMPLEMENTED(501, "Not Implemented"),
    //BAD_GATEWAY(502, "Bad Gateway"),
    //SERVICE_UNAVAILABLE(503, "Service Unavailable"),
    //GATEWAY_TIMEOUT(504, "Gateway Timeout"),
    //HTTP_VERSION_NOT_SUPPORTED(505, "HTTP Version not supported"),
    //VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates"),
    //INSUFFICIENT_STORAGE(507, "Insufficient Storage"),
    //LOOP_DETECTED(508, "Loop Detected"),
    //BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded"),
    //NOT_EXTENDED(510, "Not Extended"),
    //NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required"),
    //UNKNOWN_REASON(512, "未知错误"),
    //IDCARD_ERROR(8000,"身份证号码不正确")

    /**
     * 响应的状态码
     */

    int code;
    /**
     * 响应的信息
     */
    String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
